package com.sg.controller.pbff;

import com.sg.service.biz.pbff.EvaThemeService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "EvaTheme", tags = {"EvaTheme"})
@RestController
// @RequestMapping("/poms/evaTheme/")
public class EvaThemeController {
    @Autowired
    EvaThemeService evaThemeService;

    /**
     * B3-2新增评价主题(平台)
     * gen by moon at 11/28/2022, 3:16:00 AM
     */
    @PostMapping("/oms/platform/mgt/evaTheme/addEvaTheme")
    @ApiOperation(value = "B3-2新增评价主题(平台)", response = OkrResult.class)
    public OkrResult<BffAddEvaThemeRespDto> addEvaTheme(@RequestBody(required = false) @Validated BffAddEvaThemeReqDto reqDTO) {
        return OkrResult.success(evaThemeService.addEvaTheme(reqDTO));
    }

    /**
     * B3-2删除评价主题(管理)
     * gen by moon at 9/20/2022, 6:34:33 PM
     */
    @PostMapping("/oms/platform/mgt/evaTheme/deleteEvaTheme")
    @ApiOperation(value = "B3-2删除评价主题(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteEvaThemeRespDto> deleteEvaTheme(@RequestBody(required = false) @Validated BffDeleteEvaThemeReqDto reqDTO) {
        return OkrResult.success(evaThemeService.deleteEvaTheme(reqDTO));
    }

    /**
     * B3-2查询评价主题详情（平台）
     * gen by moon at 10/10/2022, 1:33:26 AM
     */
    @PostMapping("/oms/platform/evaTheme/queryEvaThemeDetail")
    @ApiOperation(value = "B3-2查询评价主题详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryEvaThemeDetailRespDto> queryEvaThemeDetail(@RequestBody(required = false) @Validated BffQueryEvaThemeDetailReqDto reqDTO) {
        return OkrResult.success(evaThemeService.queryEvaThemeDetail(reqDTO));
    }

    /**
     * B3-2查询评价主题列表（平台）
     * gen by moon at 9/17/2022, 7:41:35 AM
     */
    @PostMapping("/oms/platform/evaTheme/queryEvaThemeList")
    @ApiOperation(value = "B3-2查询评价主题列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryEvaThemeListRespDto> queryEvaThemeList(@RequestBody(required = false) @Validated BffQueryEvaThemeListReqDto reqDTO) {
        return OkrResult.success(evaThemeService.queryEvaThemeList(reqDTO));
    }

    /**
     * B3-2修改评价主题（平台）
     * gen by moon at 12/6/2022, 5:00:23 PM
     */
    @PostMapping("/oms/platform/evaTheme/updateEvaTheme")
    @ApiOperation(value = "B3-2修改评价主题（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateEvaThemeRespDto> updateEvaTheme(@RequestBody(required = false) @Validated BffUpdateEvaThemeReqDto reqDTO) {
        return OkrResult.success(evaThemeService.updateEvaTheme(reqDTO));
    }

}

